/*
 * @Description: 
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-08-02 16:10:47
 * @LastEditTime: 2022-01-18 20:05:24
 * @FilePath: \cscec-pms-admin\src\views\design\training\trainingConference\components\model.js
 */
import SelectSubCompany from '@/components/Select/SelectSubCompany'
import SelectProject from '@/components/Select/SelectProject'
import SelectProjectStatus from '@/views/quality/components/SelectProjectStatus' // 项目状态
import OrgTreeSelect from '@/components/OrgTreeSelect'
// 状态列表
const statusList = [
  {
    value: '20',
    label: '待开始',
    color: '#1890ff'
  },
  {
    value: '30',
    label: '进行中',
    color: '#70B603'
  },
  {
    value: '35',
    label: '审批中',
    color: '#1890ff'
  },
  {
    value: '40',
    label: '已完结',
    color: '#666666'
  },
  {
    value: '50',
    label: '审批不通过',
    color: '#666666'
  }
]
// 搜索列表
const searchOption = [
  {
    name: '所属单位',
    valueKey: 'searchQuery',
    type: OrgTreeSelect,
  },
  // {
  //   name: '所属分公司',
  //   valueKey: 'branchComId',
  //   type: SelectSubCompany
  // },
  // {
  //   name: '所属项目',
  //   keyValue: 'branchComId',
  //   valueKey: 'projectId',
  //   type: SelectProject
  // },
  {
    name: '项目状态',
    type: SelectProjectStatus,
    valueKey: 'projectStatus'
  },
  {
    name: '会议名称',
    value: 'meetingName',
    type: 'input'
  },
  {
    name: '召开时间',
    value: 'startEndDate',
    type: 'dateRange'
  },
  {
    name: '状态',
    value: 'meetingStatus',
    type: 'select',
    data: [
      {
        value: '20',
        label: '待开始',
        color: '#1890ff'
      },
      {
        value: '30',
        label: '进行中',
        color: '#70B603'
      },
      {
        value: '40',
        label: '已完结',
        color: '#666666'
      }
    ]
  }
]
// 搜索列表
const searchOption2 = [
  {
    name: '所属单位',
    valueKey: 'searchQuery',
    type: OrgTreeSelect,
  },
  // {
  //   name: '所属分公司',
  //   valueKey: 'branchComId',
  //   type: SelectSubCompany
  // },
  // {
  //   name: '所属项目',
  //   keyValue: 'branchComId',
  //   valueKey: 'projectId',
  //   type: SelectProject
  // },
  {
    name: '会议名称',
    value: 'meetingName',
    type: 'input'
  },
  {
    name: '召开时间',
    value: 'startEndDate',
    type: 'dateRange'
  },
  {
    name: '状态',
    value: 'meetingStatus',
    type: 'select',
    data: statusList
  }
]
// 会议列表表头
const columns = [
  {
    title: '序号',
    width: 80,
    align: 'center',
    customRender: (text, record, index) => {
      return index + 1
    }
  },
  {
    title: '会议名称',
    width: 200,
    dataIndex: 'meetingName'
  },
  {
    title: '会议类型',
    dataIndex: 'meetingTypeName'
  },
  {
    title: '所属分公司',
    dataIndex: 'branchComName'
  },
  {
    title: '所属项目',
    dataIndex: 'projectName'
  },
  {
    title: '召开时间',
    dataIndex: 'meetingTime'
  },
  {
    title: '参会人数',
    dataIndex: 'signNum'
  },
  {
    title: '创建人',
    dataIndex: 'createUser'
  },
  {
    title: '状态',
    dataIndex: 'meetingStatusName',
    width: 100,
    scopedSlots: { customRender: 'status' }
  },
  {
    title: '操作',
    dataIndex: 'operation',
    width: 170,
    scopedSlots: { customRender: 'operation' }
  }
]
// 页面名
const pageName = {
  add: '新增会议',
  detail: '会议详情',
  join: '进入会议',
  view: '查看会议',
}
// 培训分类
const trainType = [
  {
    value: '0',
    label: '进场培训'
  },
  {
    value: '1',
    label: '基础能力提升培训'
  },
]
// 参会人员表头
const columnsEmployee = [
  {
    title: "员工名称",
    dataIndex: "name"
  },

  {
    title: "电话号码",
    dataIndex: "phone"
  },

  {
    title: "操作",
    dataIndex: "actions",
    width: "100px",
    scopedSlots: { customRender: "actions" }
  }
]

// 会议类型编号
const meetingTypeNumber = {
  trainingConference: '4',
  planningJoint: '3',
  planningStart: '2',
  analyseConference: '1',
}
// 按钮权限
const btnPermission = {
  trainingConference: {
    add: 'ds_022_add_01',
    detail: 'ds_022_loo_02',
    join: 'ds_022_edi_03',
    view: 'ds_022_loo_04',
  },
  planningJoint: {
    add: 'ds_021_add_01',
    detail: 'ds_021_loo_02',
    join: 'ds_021_edi_03',
    view: 'ds_021_loo_04',
  },
  planningStart: {
    add: 'ds_020_add_01',
    detail: 'ds_020_loo_02',
    join: 'ds_020_edi_03',
    view: 'ds_020_loo_04',
  },
  analyseConference: {
    add: 'ds_017_add_02',
    detail: 'ds_017_loo_03',
    join: 'ds_017_edi_04',
    view: 'ds_017_loo_05',
  },
}


export {
  statusList,
  searchOption,
  searchOption2,
  columns,
  columnsEmployee,
  pageName,
  trainType,
  meetingTypeNumber,
  btnPermission
}